package edu.zju.gis.dbfg.queryserver.controller;

import edu.zju.gis.dbfg.queryserver.model.SearchResult;
import edu.zju.gis.dbfg.queryserver.service.MapServiceService;
import edu.zju.gis.dbfg.queryserver.tool.RestElasticSearchHelper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/mapservice")
public class MapServiceController{
    @Autowired
    private MapServiceService mapServiceService;
    @Autowired
    RestElasticSearchHelper helper;
    /**
     * 多条件+范围查询
     */
    @RequestMapping(value="/search", method = RequestMethod.GET)
    public SearchResult search(@RequestBody String requestBody)
    {
        return mapServiceService.search(requestBody);
    }
}
